/**
 * Created by asus on 2017/9/25.
 */
public class MyArray implements Comparable {

    private int age;

    public MyArray(int age){
        this.age=age;
    }
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return ""+age;
    }

    @Override
    public int compareTo(Object o) {
        if (this.age>((MyArray)o).age)
            return 1;
        else if (this.age==((MyArray)o).age)
            return 0;
        else
            return -1;
    }
}
